package com.efresh.nico.gr_superman;

import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import com.efresh.nico.gr_superman.adapter.MymissionAdapter;
import com.efresh.nico.gr_superman.dao.Mission;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by admin on 2015/12/6.
 */
public class MymissionFragment extends Fragment {
    private MymissionAdapter adapter;
    private ListView listView;
    private List<Mission> missionList = new ArrayList<Mission>() ;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.mymission_main,container,false);
        getActivity().getActionBar().setTitle("我的任务");
        listView = (ListView) view.findViewById(R.id.mymission_listview);
        missionList.add(new Mission("zhagns","wangwu","11111"));
        missionList.add(new Mission("zhagns","wangwu","11111"));
        adapter = new MymissionAdapter(getActivity(),R.layout.mymission_mian_item,missionList);
        listView.setAdapter(adapter);
        return view;
    }
}
